package com.xintoucloud.springbootguide.repository;

import java.util.List;

import com.xintoucloud.springbootguide.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


public interface StudentRepository extends JpaRepository<Student, Integer>{
	List<Student> findByGender(String gender);
	List<Student> findByGenderOrAddress(String gender,String address);
	@Query("from Student s where s.gender=?1 and s.sname=?2 ") //jpql
	List<Student> selectStudents(String gender,String name);
}
